package com.corona.game;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.corona.Game;
import com.corona.game.util.TextureCache;

/* compiled from: Menu.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/PokemonFrame.class */
class PokemonFrame extends Action {
    Pokemon pokemon;
    int timer = 0;
    public boolean isDone = false;
    Sprite bg = new Sprite(TextureCache.get(Gdx.files.internal("menu/frame1.png")), 0, 0, 160, 144);

    public PokemonFrame(Pokemon pokemon, Action nextAction) {
        super(new Object[0]);
        this.pokemon = pokemon;
        this.nextAction = nextAction;
    }

    @Override // com.corona.game.Action
    public String getCamera() {
        return "gui";
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return Action.Layer.gui_0;
    }

    @Override // com.corona.game.Action
    public void firstStep(Game game) {
        game.battle.oppPokemon = this.pokemon;
        game.insertAction(new WaitFrames(game, 4, new PlayMusic(this.pokemon, (Action) null)));
        game.insertAction(new PokemonIntroAnim(new WaitFrames(game, 30, new SetField(this, "isDone", true, null))));
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        game.uiBatch.draw(this.bg, 0.0f, 0.0f);
        game.uiBatch.draw(new Sprite((Sprite) this.pokemon.sprite), (float) (84 - ((int) (this.pokemon.sprite.getWidth() / 2.0f))), 48.0f);
        if (this.isDone) {
            game.actionStack.remove(this);
            game.insertAction(this.nextAction);
        }
    }
}
